function s = F_d(v)
global X;
global n_F_d;
global F_total;
n = n_F_d;
s=0;
if v == 0
    s = 0;
else 
for k = 1:n-1
    if v>X(k) && v<=X(k+1)
        s = F_total(round((v-X(k))/0.001)+1,k);
    end
end
end

